﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Cali
{
    public partial class Form_Password : Form
    {
        private string _sValidate;
        public Form_Password(string Password)
        {
            InitializeComponent();
            _sValidate = Password;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            
            if (_sValidate == textBox_pwd.Text)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
            else
            {
                //this.DialogResult = DialogResult.No;
                if (MessageBox.Show("密码错误，请重新输入。", "错误提示：", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error).Equals(DialogResult.Cancel))
                    this.Close();
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
